home *** CD-ROM | disk | FTP | other *** search
/ Champak 106 / Vol 106.iso / games / crash_du.swf / scripts / DefineSprite_311 / frame_104 / DoAction.as
Encoding:
Text File  |  2010-04-12  |  1.1 KB  |  42 lines

  1. function setUpNewSound(soundName, vol)
  2. {
  3.    var _loc1_ = _root;
  4.    var _loc2_ = soundName;
  5.    if(soundCount == undefined)
  6.    {
  7.       soundCount = 1;
  8.    }
  9.    _loc1_.createEmptyMovieClip("soundHolder" + soundCount,soundCount);
  10.    _loc1_[_loc2_] = new Sound(_loc1_["soundHolder" + soundCount]);
  11.    _loc1_[_loc2_].attachSound(_loc2_);
  12.    _loc1_[_loc2_].setVolume(vol);
  13.    soundCount++;
  14. }
  15. function newGame()
  16. {
  17.    score = 0;
  18.    currentJump = 1;
  19.    jump1 = "";
  20.    jump2 = "";
  21.    jump3 = "";
  22.    trace("currentJump " + currentJump);
  23.    gotoAndStop("startLevel");
  24. }
  25. allsound = new Sound();
  26. vol = 1;
  27. var currentLevel = 1;
  28. var enemySlowSpeedArray = new Array(0,0.15,0.08,0.04);
  29. engineLoop = new Sound(this);
  30. engineLoop.attachSound("engineLoop");
  31. engineLoop.setVolume(100);
  32. engineNoise = new Sound(this);
  33. engineNoise.attachSound("engineNoise");
  34. engineNoise.setVolume(100);
  35. engineSlow = new Sound(this);
  36. engineSlow.attachSound("engineSlow");
  37. engineSlow.setVolume(100);
  38. var engineNoiseOffsets = new Array(0,0,0.5,1,1.5,2,2.5);
  39. setUpNewSound("skid",100);
  40. setUpNewSound("thud",100);
  41. stop();
  42.